using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace RandomRat {
	/// <summary>
	/// Summary description for EditType.
	/// </summary>
	public class EditType : System.Windows.Forms.Form {

		private System.Windows.Forms.Button butCancel;
		private System.Windows.Forms.Button butOK;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.TextBox txtType;
		private System.ComponentModel.Container components = null;

		public EditType(string type){
			InitializeComponent();

			txtType.Text = type;
		}

		public string Type {
			get { return txtType.Text; }
		}


		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.butCancel = new System.Windows.Forms.Button();
			this.butOK = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this.txtType = new System.Windows.Forms.TextBox();
			this.SuspendLayout();
			// 
			// butCancel
			// 
			this.butCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.butCancel.Location = new System.Drawing.Point(232, 26);
			this.butCancel.Name = "butCancel";
			this.butCancel.Size = new System.Drawing.Size(56, 20);
			this.butCancel.TabIndex = 3;
			this.butCancel.Text = "Cancel";
			// 
			// butOK
			// 
			this.butOK.Location = new System.Drawing.Point(171, 26);
			this.butOK.Name = "butOK";
			this.butOK.Size = new System.Drawing.Size(56, 20);
			this.butOK.TabIndex = 2;
			this.butOK.Text = "OK";
			this.butOK.Click += new System.EventHandler(this.butOK_Click);
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(8, 8);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(56, 16);
			this.label1.TabIndex = 4;
			this.label1.Text = "Type:";
			// 
			// txtType
			// 
			this.txtType.Location = new System.Drawing.Point(8, 26);
			this.txtType.MaxLength = 75;
			this.txtType.Name = "txtType";
			this.txtType.Size = new System.Drawing.Size(156, 20);
			this.txtType.TabIndex = 1;
			this.txtType.Text = "";
			// 
			// EditType
			// 
			this.AcceptButton = this.butOK;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.CancelButton = this.butCancel;
			this.ClientSize = new System.Drawing.Size(296, 54);
			this.ControlBox = false;
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.txtType,
																		  this.label1,
																		  this.butCancel,
																		  this.butOK});
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.Name = "EditType";
			this.ShowInTaskbar = false;
			this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "Edit Type";
			this.Activated += new System.EventHandler(this.EditType_Activated);
			this.ResumeLayout(false);

		}
		#endregion

		private void butOK_Click(object sender, System.EventArgs e) {
			this.DialogResult = DialogResult.OK;
			this.Close();
		}

		private void EditType_Activated(object sender, System.EventArgs e) {
			txtType.Focus();
		}

	}
}
